<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>

	<script type='text/javascript'>
		function show() {
			//表格行数
			var rows = document.getElementById("example_table").rows.length;

			//表格列数
			var cells = document.getElementById("example_table").rows.item(0).cells.length;

			var txt = document.getElementById('data');
			txt.innerHTML = "rows: " + rows + ", columns: " + cells;
		}
	</script>
</head>
<body onload="show()">
	<p id="data"></p>

	<table width="100%" border="1" cellspacing="0" cellpadding="0" id="example_table">
	    <tr>
	        <td>&nbsp;</td>
	        <td>&nbsp;</td>
	        <td>&nbsp;</td>
	        <td>&nbsp;</td>
	        <td>&nbsp;</td>
	    </tr>
	    <tr>
	        <td>&nbsp;</td>
	        <td>&nbsp;</td>
	        <td>&nbsp;</td>
	        <td>&nbsp;</td>
	        <td>&nbsp;</td>
	    </tr>
	    <tr>
	        <td>&nbsp;</td>
	        <td>&nbsp;</td>
	        <td>&nbsp;</td>
	        <td>&nbsp;</td>
	        <td>&nbsp;</td>
	    </tr>
	</table>


</body>
</html>